-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve capabilities reporting #64
Improve capabilities reporting #64
Conversation
- add a list of attributes marked as "deprecated", but that are still necessary for 2.x applications; - also, set the size of written value, which is implicit for 3.x applications, but which is expected by (some) 2.x ones.
Some catalog functions are required in order for the minimum driver level to be achieved, so that apps can work with it. However, not all of them have a current backing in ES/SQL. For these, a fake local empty answer is provided. With this change, some 2.x apps can now inquiry the columns count and type (which 3.x apps would typically assume), which didn't work before. The rest remains unchanged: the app will fetch no row and the call succeeds.
- the function fakes an empty answer, no ES/SQL backing atp.
- updated README - removed stale code in build.bat
- the catalog function will now propagate to ES/SQL the SQL type the app is inquiring for (when not using the _ALL wildcard).
- add an early check for connection logging destination directory; - if a connection-level logger can't be initialized, the failure is now logged in the "general" logger, if available.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - one minor suggestion
driver/catalogue.c
Outdated
STMT_FORCE_NODATA(STMH(hstmt)); | ||
return SQL_SUCCESS; | ||
/*INDENT-OFF*/ | ||
# define SPECIAL_COLUMNS_EMPTY \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: rename to FOREIGN_KEYS_EMPTY
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, nice. Thanks for spotting it. Fixed now.
- fix copy&paste error.
* add "deprecated" SQLGetInfo attributes support - add a list of attributes marked as "deprecated", but that are still necessary for 2.x applications; - also, set the size of written value, which is implicit for 3.x applications, but which is expected by (some) 2.x ones. * fix: add "fake" answers to unsupported catalog fn Some catalog functions are required in order for the minimum driver level to be achieved, so that apps can work with it. However, not all of them have a current backing in ES/SQL. For these, a fake local empty answer is provided. With this change, some 2.x apps can now inquiry the columns count and type (which 3.x apps would typically assume), which didn't work before. The rest remains unchanged: the app will fetch no row and the call succeeds. * add SQLStatistics catalog function support - the function fakes an empty answer, no ES/SQL backing atp. * fix: update VS package reqs to cover DSN editor - updated README - removed stale code in build.bat * minor improvements in connection attributes handling * add support for filtering in SQLGetTypeInfo - the catalog function will now propagate to ES/SQL the SQL type the app is inquiring for (when not using the _ALL wildcard). * expose SQLStatistics to the API * minor connection logging setting validation - add an early check for connection logging destination directory; - if a connection-level logger can't be initialized, the failure is now logged in the "general" logger, if available. * fix: s/SPECIAL_COLUMNS_EMPTY/FOREIGN_KEYS_EMPTY - fix copy&paste error. (cherry picked from commit 8d10a5f)
This PR adds a few improvements in driver's capabilities reporting to the client application:
SQLGetInfo()
are now supported (mostly for the 2.x apps);SQLStatistics()
is added to the list of facade catalog functions;SQLGetTypeInfo()
will forward to ES/SQL the type the app wants to filter the result by.